import {
    getToken
} from '@/utils/myauth'
export default {
    data() {
        return {
            // head: process.env.VUE_APP_IMG_URL, //图片头部显示拼接临时路径
            pages: {
                currentPage: 1,
                size: 8,
                total: 0,
                pagercount: 5
            },
            loadingOption: {
                background: 'rgba(255,255,255,.9)',
                text: '加载中.....',
                spinner: 'el-icon-loading'
            },
            // action: process.env.VUE_APP_BASE_API + '/api/tool/upload' // 上传图片素材公用接口
        }
    },
    methods: {
        //   分页数量改变(一页显示几个)
        handleSize(val) {
            console.log(val);
            this.pages.size = val;
            this.pages.currentPage = 1;
            // this.init(); 
        },
        //分页页数改变(显示第几页)
        handleCurrent(val) {
            console.log(val);
            this.pages.currentPage = val;
            this.init();
        },
    },
    computed: {
        //定义图片上传接口请求头
        headers() {
            const token = getToken()
            const headers = {
                token: token
            }
            return headers
        }
    }
}
